<?php

/**
 * GestdentEgreso form base class.
 *
 * @package    gestdent
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseGestdentEgresoForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'            => new sfWidgetFormInputHidden(),
      'sucursal'      => new sfWidgetFormPropelChoice(array('model' => 'GestdentSucursal', 'add_empty' => false)),
      'tipoegreso'    => new sfWidgetFormPropelChoice(array('model' => 'GestdentTipoEgreso', 'add_empty' => false)),
      'cuenta'        => new sfWidgetFormPropelChoice(array('model' => 'GestdentCuenta', 'add_empty' => false)),
      'fecha'         => new sfWidgetFormDate(),
      'doctocompra'   => new sfWidgetFormInput(),
      'nombre'        => new sfWidgetFormInput(),
      'valor'         => new sfWidgetFormInput(),
      'documentopago' => new sfWidgetFormInput(),
      'detalle'       => new sfWidgetFormInput(),
      'created_at'    => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'            => new sfValidatorPropelChoice(array('model' => 'GestdentEgreso', 'column' => 'id', 'required' => false)),
      'sucursal'      => new sfValidatorPropelChoice(array('model' => 'GestdentSucursal', 'column' => 'id')),
      'tipoegreso'    => new sfValidatorPropelChoice(array('model' => 'GestdentTipoEgreso', 'column' => 'id')),
      'cuenta'        => new sfValidatorPropelChoice(array('model' => 'GestdentCuenta', 'column' => 'id')),
      'fecha'         => new sfValidatorDate(),
      'doctocompra'   => new sfValidatorString(array('max_length' => 255)),
      'nombre'        => new sfValidatorString(array('max_length' => 255)),
      'valor'         => new sfValidatorInteger(),
      'documentopago' => new sfValidatorString(array('max_length' => 255)),
      'detalle'       => new sfValidatorString(array('max_length' => 255)),
      'created_at'    => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('gestdent_egreso[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'GestdentEgreso';
  }


}
